<li id="class_<%= branch.id %>">
    <%
        # Хак для in_place_editor_field
    %>
    <% @business_process_class = branch %>
    
    <%= in_place_editor_field :business_process_class, :name, {}, { :rows=>2, :cols=>100, :cancel_text=>'Отменить', :save_text=>'Сохранить', :click_to_edit_text=>'Нажмите для редактирования' } %>
    
    <%= link_to_remote image_tag('page_new.gif', :border => 0, :title => 'Добавить подкласс'), :url => { :action => 'new', :id => branch.id }, :update => 'new-business-process-class-form-holder' %>
    
    <%= link_to_remote image_tag('page_cross.gif', :border => 0, :title => 'Удалить класс'), :url => { :action => 'destroy', :id => branch.id }, :method => :delete %>
    
    <% if branch.children.count > 0 %>
    <ul id="branch_<%= branch.id %>">
        <%= render(:partial => 'branch', :collection => branch.children) %>
    </ul>
    <%= sortable_element 'branch_' + branch.id.to_s, :url => { :action => 'sort', :id => branch.id }  %>
    <% end %>
</li>